package com.yiquan.video.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.util.Date;

/**
 * @author Tyrone
 * @date 2021/12/31 14:22
 */
@Table(name = "yiquan_video_behave")
@Entity
@Data
public class VideoBehave {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
//    @JsonSerialize(using = ToStringSerializer.class)
    private Long video_id;
//    @JsonSerialize(using = ToStringSerializer.class)
    private Long user_id;
    // 操作 1：点赞 2：收藏 3：转发
    private Integer operate;
    @JsonFormat(pattern = "yyyy-MM-dd mm:HH:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd mm:HH:ss")
    @Column(name = "operate_time")
    private Date operateTime;
    private Integer status;

}
